<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminStatementsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_statements', function (Blueprint $table) {
            $table->increments('id');
            $table->date('statementtime')->comment('结算时间');
            $table->integer('adminuserid')->comment('用户ID');
            $table->integer('doubledays')->comment('本月活动天数');
            $table->decimal('amount',16,2)->comment('本月提成金额');
            $table->decimal('newshoppercentage',16,2)->comment('新店拓展提成');
            $table->decimal('doubledaypercentage',16,2)->comment('活动日提成');
            $table->decimal('performancepercentage',16,2)->default(0)->comment('绩效佣金');
            $table->decimal('amountdeductions', 16,2)->comment('本月扣款金额');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('shop_users');
    }
}
